<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="/resource/js/bootstrap.js"></script>
<script type="text/javascript" src="/resource/js/jquery.validate.js"></script>
<script type="text/javascript" src="/resource/My97DatePicker/WdatePicker.js"></script>
<link href="/resource/css/bootstrap.css" rel="stylesheet">
<link href="/resource/css/index.css" rel="stylesheet">
<link href="/resource/css/jqueryvalidate/screen.css" rel="stylesheet">
</head>
<body>
<form action="list" method="post">
宿舍名:
<input name="dname" value="${vo.dname }">
住宿楼:
<select name="fid">
	<option value="">请选择</option>
	<c:forEach items="${fools }" var="fool">
	<option value="${fool.fid }"  ${fool.fid==vo.fid?'selected':'' }>${fool.fname }</option>
	
	</c:forEach>
</select>
<input type="submit" value="查询">
 <a href="toTiao"><input type="button" value="调寝" ></a> 
<input type="hidden" id="pa" name="pageNum">
<table class="table">
  <thead>
    <tr>
      <th scope="col">宿舍id</th>
      <th scope="col">宿舍名</th>
      <th scope="col">住宿楼名</th>
      <th scope="col">当前宿舍人数</th>
      <th scope="col">当前宿舍入住人名</th>
      <th scope="col">图片</th>
    </tr>
  </thead>
  <tbody>
  	<c:forEach items="${pg.list }" var="d">
  	<tr>
      <th scope="row">${d.did }</th>
      <td>${d.dname }</td>
      <td>${d.fnames }</td>
      <td>${d.unums }</td>
      <td>${d.unames }</td>
      <td>
      	<img alt="" src="${d.pic }" height="100px" width="100px">
      </td>
    </tr>
  	</c:forEach>
    
  </tbody>
</table>
<jsp:include page="/resource/common/pages.jsp"></jsp:include>
</form>
<script type="text/javascript">
	function goPage(pageNum) {
		$("#pa").val(pageNum);
		$("form").submit();
	}


</script>


</body>
</html>